home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1995-02-23 | 1.5 KB | 51 lines | [TEXT/3PRM] |
- implementation module deltaIOState;
-
-
- import quickdraw;
- import windowDevice, ioState, deltaIOSystem;
-
-
- /* SetGlobalCursor sets the shape of the cursor globally. This shape overrules the local cursor
- shapes of windows. */
-
- SetGlobalCursor :: !CursorShape !(IOState s) -> IOState s;
- SetGlobalCursor HiddenCursor io = io;
- SetGlobalCursor shape io
- = IOStateSetDevice (IOStateSetCursorShape shape io`) windows`;
- where {
- (windows, io`) = IOStateGetDevice io WindowDevice;
- windows` = WindowsSetGlobalCursor shape windows;
- };
-
- WindowsSetGlobalCursor :: !CursorShape !(DeviceSystemState s) -> DeviceSystemState s;
- WindowsSetGlobalCursor shape (WindowSystemState (ws,_))
- = WindowSystemState (ws, GlobalCursorSet shape);
-
-
- /* ResetCursor undoes the effect of SetGlobalCursor. */
-
- ResetCursor :: !(IOState s) -> IOState s;
- ResetCursor io
- = IOStateSetDevice io` windows`;
- where {
- (windows,io`) = IOStateGetDevice io WindowDevice;
- windows` = WindowsResetCursor windows;
- };
-
- WindowsResetCursor :: !(DeviceSystemState s) -> DeviceSystemState s;
- WindowsResetCursor (WindowSystemState (ws,_))
- = WindowSystemState (ws, NoGlobalCursor);
-
-
- /* ObscureCursor hides the cursor until the mouse is moved. */
-
- ObscureCursor :: !(IOState s) -> IOState s;
- ObscureCursor io = IOStateChangeToolbox QObscureCursor io;
-
-
- /* SetDoubleDownDistance sets the double down distance of the mouse. Negative values are
- set to zero. */
-
- SetDoubleDownDistance :: !DoubleDownDist !(IOState s) -> IOState s;
- SetDoubleDownDistance new_dddist io = IOStateSetDoubleDownDist new_dddist io;
-